package com.vastcom.sigma.admin.model;

import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;

@Entity
public class Cargocate {
    private String cargocateid;
    private String name;
    private String basecode;
    private String pid;

    @Id
    @Column(name = "cargocateid")
    public String getCargocateid() {
        return cargocateid;
    }

    public void setCargocateid(String cargocateid) {
        this.cargocateid = cargocateid;
    }

    @Basic
    @Column(name = "name")
    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    @Basic
    @Column(name = "basecode")
    public String getBasecode() {
        return basecode;
    }

    public void setBasecode(String basecode) {
        this.basecode = basecode;
    }

    @Basic
    @Column(name = "pid")
    public String getPid() {
        return pid;
    }

    public void setPid(String pid) {
        this.pid = pid;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;

        Cargocate cargocate = (Cargocate) o;

        if (cargocateid != null ? !cargocateid.equals(cargocate.cargocateid) : cargocate.cargocateid != null)
            return false;
        if (name != null ? !name.equals(cargocate.name) : cargocate.name != null) return false;
        if (basecode != null ? !basecode.equals(cargocate.basecode) : cargocate.basecode != null) return false;
        if (pid != null ? !pid.equals(cargocate.pid) : cargocate.pid != null) return false;

        return true;
    }

    @Override
    public int hashCode() {
        int result = cargocateid != null ? cargocateid.hashCode() : 0;
        result = 31 * result + (name != null ? name.hashCode() : 0);
        result = 31 * result + (basecode != null ? basecode.hashCode() : 0);
        result = 31 * result + (pid != null ? pid.hashCode() : 0);
        return result;
    }
}
